Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

479
Vistas
Can someone help me understand and solve this "Failed to install @parcel/transformer-image"? (JS)

I've been trying and failing repeatedly to install this parcel module and because of it I can't show images. I'm new to both using JS and using parcel and english is not my native language, so please ask for some patience here.

The error that appears is

Failed to install @parcel/transformer-image: npm failed to install modules: Unexpected token > in JSON at position 1

I've tried numerous solutions:

  • I've tried to uninstall and reinstall only the parcel/transformer-image module
  • I've already tried uninstalling and reinstalling the entire parcel
  • I've already tried uninstalling and reinstalling node-js and npm
  • I've already tried to install node through node manager nodist, but I ran into another error

At first, the build didn't work, but when I deactivated and activated the parcel again, it worked, but without loading the images. At this the moment the error doesn't appear anymore, but the image still doesn't load (and I inspected the element and saw that the link where the image should be loaded is correct).

After installing nodist and even after uninstalling it I'm having problems installing the parcel, but I managed it anyway.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

This is how I solved it. There were two issues I needed to resolve:

  1. "npm install parcel" in any form/version did not work. After consulting Parcel's install guide they recommend installing parcel-bundler NOT parcel:
npm install parcel-bundler --save-dev

SOURCE: https://parceljs.org/getting_started.html

  1. Once installed, I immediately ran into an error - Uncaught ReferenceError: regeneratorRuntime is not defined - when doing the first async/await function.

To solve this I had to add the code below for "browserslist" to package.json

{
    "name": "my-app",
    ...
    "browserslist": [
        "last 1 Chrome versions"
    ],
    ...
}

SOURCE: https://github.com/parcel-bundler/parcel/issues/2128

package.json settings shown in the pic attached.

enter image description here

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda